﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KongMing.ORM.EFCore.Models
{
    /// <summary>
    /// 登录信息保存
    /// </summary>
    public class SysAuthToken
    {
        public int Id { get; set; }

        /// <summary>
        /// JWT生成的身份认证令牌
        /// </summary>
        public string? AuthToken { get; set; }

        /// <summary>
        /// Jwt的加密类型：0对称可逆加密，1非对称可逆加密
        /// </summary>
        public int? KeySymmetryType { get; set; }

        /// <summary>
        /// 登录用户的Id
        /// </summary>
        public string? UserId { get; set; }

        /// <summary>
        /// 登录用户的姓名
        /// </summary>
        public string? UserName { get; set; }

        /// <summary>
        /// 登录时间
        /// </summary>
        public DateTime? LoginTime { get; set; }

        /// <summary>
        /// token状态：0正常，-1失效，系统强制控制身份认证失效
        /// </summary>
        public int Status { get; set; } = 0;

        /// <summary>
        /// 登录用户（客户端）的IP
        /// </summary>
        public string? Ip { get; set; }
    }
}
